{include file="public/head" /}
{include file="public/js_ueditor" /}
<link href="{:config('template.skin')}/bootstrap-datepicker/css/bootstrap-datepicker3.min.css" rel="stylesheet" type="text/css" />
<!--有理想的地方，地狱都是天堂-->
<!--Copyright @ df81.com 版权所有-->
<!--作者: 南国老符 邮箱：1062129401@qq.com-->
        <!-- 左侧菜单 开始 -->
        <div class="sidebar">
            <nav>
                <ul class="nav nav-pills nav-sidebar flex-column nav-flat nav-legacy d-block d-md-none" data-widget="treeview" role="menu" data-accordion="false">
                    {include file="public/left_content" /}
                </ul>
                <ul class="nav nav-pills nav-sidebar flex-column nav-flat nav-legacy" data-widget="treeview" role="menu" data-accordion="false">
                    {include file="public/left_data" /}
                </ul>
                <ul class="nav nav-pills nav-sidebar flex-column nav-flat nav-legacy d-block d-md-none" data-widget="treeview" role="menu" data-accordion="false">
                    {include file="public/left_global" /}
                </ul>
                <ul class="nav nav-pills nav-sidebar flex-column nav-flat nav-legacy d-block d-md-none" data-widget="treeview" role="menu" data-accordion="false">
                    {include file="public/left_system" /}
                </ul>
            </nav>
        </div>
        <!-- 左侧菜单 结束 -->
    </aside>
    <!-- 左侧 结束 -->
    <!-- 右侧 开始 -->
    <div class="content-wrapper">
        <!-- 内容导航 开始 -->
        <div class="content-header py-2 bg-white mb-3">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-sm-12">
                        <ol class="breadcrumb">
                            <li>{:lang('v_data_manage')}<i class="fas fa-angle-right mx-2"></i></li>
                            <li>{:lang('v_data_manage')}<i class="fas fa-angle-right mx-2"></i></li>
                            <li>{:lang('v_user')} {:lang('v_manage')}<i class="fas fa-angle-right mx-2"></i></li>
                            <li>{empty name="rs.id"}{:lang('v_add')}{else /}{:lang('v_edit')}{/empty} {:lang('v_user')}</span></li>
                        </ol>
                    </div>
                </div>
            </div>
        </div>
        <!-- 内容导航 结束 -->
        <!-- 内容主体 开始 -->
        <section class="content">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-md-12">
                        <div class="w-100 pt-3 pb-2 bg-white rounded mb-3">
                            {if config('app.isdisplay.user') eq 1}
                                <form name="form_keyword" action="{:url('/user/index',['lang'=>$lang,'group_id'=>input('group_id'),'keyword'=>input('keyword')])}" method="post" class="row">
                                    <input type="hidden" name="lang" value="{$lang}">
                                    <div class="col-md-8">
                                        <a class="float-left btn btn-default mb-2 mr-2" href="{:url('/user/index',['lang'=>$lang])}"><i class="fa fa-fw fa-user mr-1"></i>{:lang('v_user')} {:lang('v_manage')}</a>
                                        <a class="float-left btn btn-success mb-2 mr-2" href="{:url('/user/edit',['lang'=>$lang])}"><i class="fa fa-fw fa-plus-circle mr-1"></i>{:lang('v_add')} {:lang('v_user')}</a>
                                        <a class="float-left btn btn-default mb-2 mr-2" href="{:url('/user/index',['lang'=>$lang,'signid'=>9])}"><i class="fa fa-fw fa-recycle mr-1"></i>{:lang('v_recycle')}</a>
                                        <div class="float-left">
                                            <select name="group_id" class="form-control">
                                                <option value="0" {if empty(input('group_id'))}selected="selected"{/if}>{:lang('v_all')} {:lang('v_authgroup')}</option>
                                                {volist name="grouplist" id="groupRs"}
                                                    <option value="{$groupRs.id}" {eq name="Think.get.group_id" value="groupRs.id"}selected="selected"{/eq}>{$groupRs.title|msubstr=0,10}</option>
                                                {/volist}
                                            </select>
                                        </div>
                                    </div>
                                    <div class="col-md-4">
                                        <div class="input-group">
                                            <input name="keyword" placeholder="{:lang('v_quickfind')}" type="text" class="form-control">
                                            <span class="input-group-append">
                                                <button type="submit" class="btn btn-success"><i class="fa fa-search mr-1"></i>{:lang('v_search')}</button>
                                            </span>
                                        </div>
                                    </div>
                                </form>
                            {/if}
                        </div>
                    </div>
                    <div class="col-md-12">
                        <div class="card card-outline card-success card-outline-tabs border-top-0">
                            <div class="card-header p-0">
                                <div class="float-left nav-link"><i class="fa fa-edit mr-1"></i>{empty name="rs.id"}{:lang('v_add')}{else /}{:lang('v_edit')}{/empty} {:lang('v_user')}</div>
                                <ul class="nav nav-tabs border-bottom-0 float-right">
                                    <li class="nav-item">
                                        <a class="nav-link active" data-toggle="pill" href="#tab_general">{:lang('v_basic')}</a>
                                    </li>
                                    <li class="nav-item">
                                        <a class="nav-link" data-toggle="pill" href="#tab_extend">{:lang('v_extend')}</a>
                                    </li>
                                </ul>
                            </div>
                            <div class="card-body">
                                <form name="form_edit" id="form_edit" method="post" action="{:url('/user/edit',['lang'=>$lang])}">
                                    <input type="hidden" name="id" value="{$rs.id}">
                                    <input type="hidden" name="lang" value="{$lang}">
                                    <div class="tab-content">
                                        <div class="tab-pane active" id="tab_general">
                                            <div class="row form-group">
                                                <div class="col-md-3 col-form-label text-right text-danger">{:lang('v_username')} *</div>
                                                <div class="col-md-3">
                                                    <input type="text" class="form-control" name="username" value="{$rs.username}" placeholder="{:lang('v_username_tips')}" />
                                                </div>
                                            </div>
                                            <div class="row form-group">
                                                <div class="col-md-3 col-form-label text-right">{:lang('v_password')}</div>
                                                <div class="col-md-3">
                                                    <input type="text" class="form-control" name="password" value="" placeholder="{:lang('v_password_tips')}" />
                                                </div>
                                            </div>
                                            <div class="row form-group">
                                                <div class="col-md-3 col-form-label text-right">{:lang('v_repassword')}</div>
                                                <div class="col-md-3">
                                                    <input type="text" class="form-control" name="vpassword" value="" placeholder="{:lang('v_password_tips')}" />
                                                </div>
                                            </div>
                                            <div class="row form-group {if session('userid') eq 1}d-none{/if}">
                                                <div class="col-md-3 col-form-label text-right">{:lang('v_authgroup')}</div>
                                                <div class="col-md-3">
                                                    <select name="groupid" class="form-control">
                                                        {foreach name="authGroup" item="k"}
                                                            <option value="{$k.id}" {eq name="authGroupAccess.group_id" value="$k.id" }selected="selected"{/eq}>{$k.title}</option>
                                                        {/foreach}
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="row form-group">
                                                <div class="col-md-3 col-form-label text-right">{:lang('v_realname')}</div>
                                                <div class="col-md-3">
                                                    <input type="text" class="form-control" name="realname" value="{$rs.realname}" />
                                                </div>
                                            </div>
                                            <div class="row form-group">
                                                <div class="col-md-3 text-right">{:lang('g_gender')}</div>
                                                <div class="col-md-9">
                                                    <label class="form-check form-check-inline">
                                                        <input type="radio" name="gender" value="1"{eq name="rs.gender" value="1"} checked="checked"{/eq} class="form-check-input" />{:lang('g_male')}
                                                    </label>
                                                     <label class="form-check form-check-inline">
                                                        <input type="radio" name="gender" value="2"{eq name="rs.gender" value="2"} checked="checked"{/eq} class="form-check-input" />{:lang('g_female')}
                                                    </label>
                                                    <label class="form-check form-check-inline">
                                                        <input type="radio" name="gender" value="0"{empty name="rs.gender"} checked="checked"{/empty} class="form-check-input" />{:lang('g_unknown')}
                                                    </label>
                                                </div>
                                            </div>
                                            <div class="row form-group">
                                                <div class="col-md-3 col-form-label text-right">Email</div>
                                                <div class="col-md-3">
                                                    <input type="text" class="form-control" name="email" value="{$rs.email}" />
                                                </div>
                                            </div>
                                            <div class="row form-group">
                                                <div class="col-md-3 col-form-label text-right">{:lang('v_mobile')}</div>
                                                <div class="col-md-3">
                                                    <input type="text" class="form-control" name="mobile" value="{$rs.mobile}" />
                                                </div>
                                            </div>
                                            <div class="row form-group">
                                                <div class="col-md-3 col-form-label text-right">{:lang('v_wechat')}</div>
                                                <div class="col-md-3">
                                                    <input type="text" class="form-control" name="wechat" value="{$rs.wechat}" />
                                                </div>
                                            </div>
                                            <div class="row form-group">
                                                <div class="col-md-3 col-form-label text-right">QQ</div>
                                                <div class="col-md-3">
                                                    <input type="text" class="form-control" name="qq" value="{$rs.qq}" />
                                                </div>
                                            </div>
                                        </div>
                                        <div class="tab-pane" id="tab_extend">
                                            <div class="row form-group">
                                                <div class="col-md-3 col-form-label text-right">{:lang('v_nickname')}</div>
                                                <div class="col-md-3">
                                                    <input type="text" class="form-control" name="nickname" value="{$rs.nickname}" placeholder="{:lang('v_nickname_tips')}" />
                                                </div>
                                            </div>
                                            <div class="row form-group d-none">
                                                <div class="col-md-3 text-right">{:lang('shopv_distribution')} {:lang('v_status')}</div>
                                                <div class="col-md-9">
                                                    <label class="form-check form-check-inline">
                                                        <input type="radio" name="apply_type" value="0"{empty name="rs.apply_type"} checked="checked"{/empty} class="form-check-input" />{:lang('v_no_application')}
                                                    </label>
                                                    <label class="form-check form-check-inline">
                                                        <input type="radio" name="apply_type" value="1"{eq name="rs.apply_type" value="1"} checked="checked"{/eq} class="form-check-input" />{:lang('v_check_pass')}
                                                    </label>
                                                    <label class="form-check form-check-inline">
                                                        <input type="radio" name="apply_type" value="2"{eq name="rs.apply_type" value="2"} checked="checked"{/eq} class="form-check-input" />{:lang('v_not_pass')}
                                                    </label>
                                                    <label class="form-check form-check-inline">
                                                        <input type="radio" name="apply_type" value="3"{eq name="rs.apply_type" value="3"} checked="checked"{/eq} class="form-check-input" />{:lang('v_audit_pending')}
                                                    </label>
                                                </div>
                                            </div>
                                            <div class="row form-group d-none">
                                                <div class="col-md-3 col-form-label text-right">{:lang('shopv_distribution')} {:lang('v_authgroup')}</div>
                                                <div class="col-md-3">
                                                    <select name="distributor_id" class="form-control">
                                                        <option value="0" {empty name="rs.distributor_id"}selected="selected"{/empty}>{:lang('v_no_application')}</option>
                                                        {foreach name="authGroup" item="k"}
                                                            <option value="{$k.id}" {eq name="rs.distributor_id" value="$k.id" }selected="selected"{/eq}>{$k.title}</option>
                                                        {/foreach}
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="row form-group">
                                                <div class="col-md-3 col-form-label text-right">{:lang('v_avatar')}</div>
                                                <div class="col-md-3">
                                                    <div class="input-group">
                                                        <input value="{empty name="rs.avatar"}/skin/admin/img/avatar.png{else /}{$rs.avatar}{/empty}" name="avatar" id="morepics1" type="text" class="form-control">
                                                        <span class="input-group-append">
                                                            <button onclick="upImage('#morepics1');" type="button" class="btn btn-success"><i class="fas fa-cloud-upload-alt mr-1"></i>{:lang('v_upload')} {:lang('v_avatar')}</button>
                                                        </span>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row form-group">
                                                <div class="col-md-3 col-form-label text-right">{:lang('v_company')}</div>
                                                <div class="col-md-3">
                                                    <input type="text" class="form-control" name="company" value="{$rs.company}" />
                                                </div>
                                            </div>
                                            <div class="row form-group">
                                                <div class="col-md-3 col-form-label text-right">{:lang('v_telephone')}</div>
                                                <div class="col-md-3">
                                                    <input type="text" class="form-control" name="telephone" value="{$rs.telephone}" />
                                                </div>
                                            </div>
                                            <div class="row form-group">
                                                <div class="col-md-3 col-form-label text-right">{:lang('v_birthday')}</div>
                                                <div class="col-md-3">
                                                    <div class="input-group date form_date">
                                                        <input name="birthday" readonly="readonly" type="text" class="form-control" value="{if empty($rs['birthday'])}{php}echo date('Y-m-d');{/php}{else /}{$rs.birthday}{/if}">
                                                        <span class="input-group-append">
                                                            <span class="btn btn-default"><i class="fa fa-calendar-alt mr-1"></i></span>
                                                        </span>
                                                    </div>
                                                </div>
                                            </div>
                                            {include file="public/js_edit_area" /}
                                            <div class="row form-group d-none">
                                                <div class="col-md-3 col-form-label text-right">{:lang('v_security_question')}</div>
                                                <div class="col-md-3">
                                                    <input type="text" class="form-control" name="question" value="{$rs.question}" />
                                                </div>
                                            </div>
                                            <div class="row form-group d-none">
                                                <div class="col-md-3 col-form-label text-right">{:lang('v_security_answer')}</div>
                                                <div class="col-md-3">
                                                    <input type="text" class="form-control" name="answer" value="{$rs.answer}" />
                                                </div>
                                            </div>
                                            <div class="row form-group">
                                                <div class="col-md-3 col-form-label text-right">{:lang('v_sequence')}</div>
                                                <div class="col-md-3">
                                                    <input type="text" class="form-control" name="sequence" value="{$rs.sequence}" />
                                                </div>
                                            </div>
                                            <div class="row form-group">
                                                <div class="col-md-3 text-right">{:lang('v_note')}</div>
                                                <div class="col-md-3">
                                                    <textarea name="note" rows="4" class="form-control">{$rs.note}</textarea>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="offset-md-3 col-md-9 mb-4">
                                                {if is_file(app()->getRootPath().'.env')}
                                                    <button type="submit" class="btn btn-success mr-4"><i class="fa fa-check-circle mr-2"></i>{:lang('v_save')}</button>
                                                {else /}
                                                    <button type="button" class="do_ajax btn btn-success mr-4" onclick="javascript:do_ajax('#form_edit','.do_ajax','{:url('/user/edit',['lang'=>$lang])}','{:url('/user/index',['lang'=>$lang])}');"><i class="fas fa-check-circle mr-2"></i>{:lang('v_save')}</button>
                                                {/if}
                                                <button type="button" class="btn btn-default" onclick="javascript:history.back(-1);"><i class="fa fa-angle-double-left mr-1"></i>{:lang('v_goback')}</button>
                                            </div>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <!-- 内容主体 结束 -->
    </div>
    <!-- 右侧 结束 -->
{include file="public/foot" /}
<script type="text/plain" id="input_editor" style="display:none;"></script>
{include file="public/js_upload_img" /}
{include file="public/js_date_picker" /}
</body>
</html>